<!--
 * @Author: 周洋 1430536748@qq.com
 * @Date: 2024-07-25 16:16:06
 * @LastEditors: 周洋 1430536748@qq.com
 * @LastEditTime: 2024-08-22 23:24:39
 * @version: 1.2.3
 * @Description: 头像+文本
-->
<script setup lang="ts">
import { props } from '../prop.ts';
const { size, shape, src, name } = defineProps(props);
const error = (_e: any) => {
    console.log('图片加载失败触发事件！');
};
</script>
<template>
    <div class="flex flex-items-center cursor-pointer gap-1" :class="align">
        <el-avatar :size="size" :shape="shape" :src="src" :error="error" />
        <el-button link>
            <span style="color:var(--el-text-color-primary)"
                class="font-size-4 fw-600 max-w-20 text-ellipsis whitespace-normal overflow-hidden" v-show="name">{{
                    name }}</span>
        </el-button>
    </div>
</template>
<style scoped lang="scss">
.lr {
    justify-content: center;
}

.bt {
    flex-direction: column;
}
</style>